
<template>
  <div class="head">
    <div class="head-left">
      <div class="iconfont back-icon">&#xe624;</div>
    </div>
    <div class="head-input">
      <span class="iconfont">&#xe632;</span>
         <input type="text" placeholder="输入城市/景点/游玩主题" class="head-text">
    </div>
    <router-link to="/city">
      <div class="head-right">
        {{ this.city }}
        <span class="iconfont drop-icon">&#xe62d;</span>
      </div>
    </router-link>
  </div>
</template>

<script>
import { mapState } from 'vuex'
export default {
  name: "heade",
  computed: {
    ...mapState(['city'])
  }
}
</script>

<style lang="stylus" scoped>
  @import "~styles/varibles.styl"
  .head
    display: flex
    line-height: .86rem
    background: $bgColor
    color: #fff
    .head-left
      width: 0.64rem
      float: left
      .back-icon
        text-align: center
        font-size: .4rem
    .head-input
      flex: 1
      height: .64rem
      line-height: .64rem
      margin-right: .12rem
      margin-top: .12rem
      margin-left: .12rem
      background: #fff
      border-radius: .12rem
      color: #ccc
      overflow: hidden
      .head-text
        width: 100%
        margin-top: -1.3rem
        margin-left: 0.4rem
        margin-bottom: .1rem
        color: #666
    .head-right
      float: left
      min-width: 1.44rem
      text-align: center
      color: #fff 
      .drop-icon
        margin-left: -.05rem
</style>

